﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace dzs.Web.Outstorage
{
    public partial class PrintEmergency : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!string.IsNullOrEmpty(Request["emergencyNo"]))
                {
                    Bind(Request["emergencyNo"]);
                }
            }
        }

        private void Bind(string emergencyNo)
        {
            dzs.BLL.emergencyOut olm = new BLL.emergencyOut();

            DataSet ds = olm.GetList(" emergencyNo='" + emergencyNo + "'");

            if (ds.Tables[0].Rows.Count > 0)
            {
                this.lbl_batchId.Text = ds.Tables[0].Rows[0]["emergencyNo"].ToString();
                this.lbl_proid.Text = ds.Tables[0].Rows[0]["sourceProid"].ToString();
                this.lbl_project_name.Text = ds.Tables[0].Rows[0]["sourceProjectName"].ToString();
                this.lbl_receive_address.Text = ds.Tables[0].Rows[0]["receive_address"].ToString();
                this.lbl_receive_userName.Text = ds.Tables[0].Rows[0]["receive_userName"].ToString();
                this.lbl_receive_userPhone.Text = ds.Tables[0].Rows[0]["receive_userPhone"].ToString();

                this.GridView1.DataSource = ds;
                this.GridView1.DataBind();
            }

        }

    }
}